<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/index/css/common.css">
    <link rel="stylesheet" href="/index/css/swiper-3.3.1.min.css">
    <link rel="stylesheet" href="/index/css/index.css?v=3">
    <link rel="stylesheet" href="/index/css/font/iconfont.css">
    <script type="text/javascript" src="/index/js/swiper-3.3.1.min.js"></script>
    <script type="text/javascript" src="/index/js/jquery-3.4.1.min.js"></script>
    <script type="text/javascript" src="/index/js/common.js?v=4"></script>
    <title>首页</title>
</head>
<body>

<style>

</style>
{include file='common/header'}
<!-- 轮播图 -->
<div class="lunbo">
    <div class="swiper-container">
        <div class="swiper-wrapper">
            {foreach $slide as $v}
            <a href="{:url('index/iframe',['type'=>1,'id'=>$v.id,'title'=>$v.title])}?url={$v.link}" class="swiper-slide"><img src="{$img_path}{$v['image']}">

            </a>
            {/foreach}
        </div>
        <!--<div class="swiper-button-prev swiper-button-white"></div>-->
        <!--<div class="swiper-button-next swiper-button-white"></div>-->
        <!-- Add Pagination -->
        <div class="swiper-pagination"></div>


    </div>
</div>

<div class="line"></div>


<div class="recommend sons">

    {foreach $sons as $son}
    <div>
        <span>{$son.type_name}</span>
        <i class="iconfont">&#xe6aa;</i>
        <!--<img src="/index/assets/icon/sj.png" alt="">-->
    </div>
    {/foreach}

</div>


<div class="movie-list recommend-movie">

    {foreach $sons as $s}
    <ul>
        {foreach $s.navList as $n}
        <li>
            <a href="{:url('index/iframe',['type'=>2,'id'=>$n.id,'title'=>$n.nav_name])}?url={$n.url}" class="link">{$n.nav_name}</a>
        </li>
        {/foreach}

    </ul>
    {/foreach}

</div>

<a class="advert" href="{:url('index/iframe',['type'=>1,'id'=>$ad.id,'title'=>$ad.title])}?url={$ad.link}">
    <img src="{$img_path}{$ad.image}" alt="">
</a>


{if $types[0]['id'] == $type}
<div class="type-list">

    <ul>
        {foreach $typeList as $v}

        <li type="type-box">
            <div class="type-title">
                <img src="/index/assets/icon/type.jpg" alt="">
                <a  href="javascript:;">{$v.type_name}</a>
            </div>

            <div class="nav-main">
                <a class="type-more" href="{if $v.title}{:url('index/noticeDetails',['id'=>$v.eid])}{else/}javascript:;{/if}">
                    <img src="{$img_path}{$v.image}" alt="">
                    <p><span>{if $v.title}{$v.title}>>{else/}{$v.type_name}{/if}</span></p>
                </a>

                <ul class="nav-list">
                    {foreach $v.navList as $n}
                    <li><a href="{:url('index/iframe',['type'=>2,'id'=>$n.id,'title'=>$n.nav_name])}?url={$n.url}">{$n.nav_name}</a></li>
                    {/foreach}
                </ul>
            </div>


        </li>

        {/foreach}

    </ul>

</div>

{else/}
<div class="recommend">

    <div>
        <span class="on">更多分类</span>
        <i class="iconfont"  style="color:#ea2636;display: inline-block !important;">&#xe6aa;</i>
        <!--<img src="/index/assets/icon/sj.png" alt="">-->
    </div>

</div>
<div class="movie-list">

    <ul>
        {foreach $otherList as $n}
        <li>
            <a href="{:url('index/iframe',['type'=>2,'id'=>$n.id,'title'=>$n.nav_name])}?url={$n.url}" class="link">{$n.nav_name}</a>
        </li>
        {/foreach}

    </ul>

</div>

{/if}




<div style="width:90%;margin: auto;padding-top:20px;margin-top:20px;clear:both;border-top:1px solid #eee;">
    {$explain}
</div>

{include file='common/menu'}

</body>

<script type="text/javascript">

    setTimeout(function () {
        var swiper = new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            slidesPerView: 1,
            paginationClickable: false,
            spaceBetween: 30,
            loop: true,
            autoplay: 2000,
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev',
        });
    }, 100)

    $(function () {
        $('.sons').find('span').click(function () {
            $('.sons .on').removeClass('on');
            $('.sons i').hide();
            $('.recommend-movie ul').hide();
            $('.recommend-movie ul').eq($(this).parent().index()).show();
            $(this).addClass('on');
            $(this).next('i').show();
        })

        $('.sons span').eq(0).click();


    })


</script>
</html>